//
//  BMAlertView.h
//  bigmama
//
//  Created by huyuchen on 2017/8/23.
//  Copyright © 2017年 盛成文化. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger,BMAlertViewBlurEffectStyle){
    DSAlertBlurEffectStyleExtraLight = 1, //淡淡模糊
    DSAlertBlurEffectStyleLight,          //一般模糊
    DSAlertBlurEffectStyleDark            //深色模糊
};

typedef void(^ButtonClickBlock)(NSInteger index);

@interface BMAlertView : UIView
//背景颜色
//@property (nonatomic, strong) UIColor *bgColor;
//背景图片 默认没有图片
@property (nonatomic, copy) NSString *bgImageName;
//是否显示遮罩层
@property (nonatomic, assign) BOOL isShowOverlay;
//是否点击遮罩隐藏
@property (nonatomic, assign) BOOL isTouchEdgeHide;
//背景模糊枚举
//@property (nonatomic, assign) BMAlertViewBlurEffectStyle blurEffectStyle;
//点击回调
@property (nonatomic, copy) ButtonClickBlock buttonClickBlock;

/**
 Alert自定义UIView弹窗
 注意 customView的x为 左右间距,y为上下间距,若设置了height则优先设置height不设置上下间距
 @param customView      自定义UIView
 @param configuration   配置属性(背景颜色,背景图片,遮罩是否显示)
 */
+ (instancetype)showCustomView:(UIView *)customView isCenter:(BOOL)isCenter configuration:(void(^)(BMAlertView *tempView))configuration;

/**
 Alert弹窗

 @param title               标题(可空)
 @param message             内容(可空)
 @param buttonTitles        按钮标题(不可控)
 @param buttonTitlesColor   按钮标题颜色(可空)
 @param configuration       属性配置
 @param clickBlock          点击回调
 */
+ (void)showAlertWithTitle:(NSString *)title
                   message:(NSString *)message
              buttonTitles:(NSArray<NSString *> *)buttonTitles
         buttonTitlesColor:(NSArray<UIColor *> *)buttonTitlesColor
             configuration:(void(^)(BMAlertView *view))configuration
                clickBlock:(ButtonClickBlock)clickBlock;

/**
 自定义动画视图

 @return instancetype
 */
- (instancetype)initWithCustomView:(UIView *)customView isCenter:(BOOL)isCenter;

/**
 警告框

 @param title               标题
 @param message             内容
 @param buttonTitles        按钮标题
 @param buttonTitlesColor   按钮颜色
 @return instancetype
 */
- (instancetype)showTitle:(NSString *)title message:(NSString *)message buttonTitles:(NSArray<NSString *> *)buttonTitles buttonTitlesColor:(NSArray<UIColor *> *)buttonTitlesColor;

- (void)showAlert;

- (void)dismissAlert;

@end
